//模拟接口请求时间
const delay = (t)=>{
    return new Promise((resolve, ) => {
        setTimeout(() => {
            resolve()
        }, t);
    })
}

const exploreCardsMock = async (nums=19) => {
    await delay(1000)
    return new Array(nums).fill(1).map((a, i) => {
        let r = Math.random() // (0,1)
        r = Math.floor(r * 4) + 1
        return {
            id: 0,
            isVideo: Math.random() > 0.5 ? 1 : 0,
            ImageUrl: 'src/mock/images/0' + r + '.png',
            content: r % 2 != 0 ? '我出去上班不惦记工作!惦记什么?你的烂苹果吗? #烂苹果 #苹果 #钱' : '这个房间你想住进来吗? #双人 #睡觉',
            avatar: 'src/mock/images/h0' + r + '.png',
            author: 'TheHuang' + r,
            likeCount: Math.floor(Math.random() * 1000)
        }
    })
}


export {
    exploreCardsMock
}